import React, {Component} from 'react';

class App extends Component {
    state = {
        name: '222222'
    }
    render() {

        return (
            <div>
                <h1>登录页</h1>
                <input type="text" value={this.state.name} onChange={(event)=>{
                    console.log(event.target.value)
                    this.setState({
                        name: event.target.value
                    })
                }}/>
                <br/>
                <button onClick={() => {

                }}>登录
                </button>
                <button onClick={() => {
                    this.setState({
                        name: ''
                    })
                }}>重置
                </button>
            </div>
        );
    }
}

export default App;
